package com.bzkj.inventory.domain;

import java.util.Objects;

/**
 * @ClassName MaterialBatchKey
 * @Description TODO
 * @Author C1309
 * @Date 2025/5/13 9:12
 */
public class MaterialBatchKey {
    public final String cmaterialvid;
    public final String pk_batchcode;
    public final String vbatchcode;
    public final String cproductorid;

    public MaterialBatchKey(String cmaterialvid, String pk_batchcode, String vbatchcode, String cproductorid) {
        this.cmaterialvid = cmaterialvid;
        this.pk_batchcode = pk_batchcode;
        this.vbatchcode = vbatchcode;
        this.cproductorid = cproductorid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MaterialBatchKey that = (MaterialBatchKey) o;
        return Objects.equals(cmaterialvid, that.cmaterialvid) &&
                Objects.equals(pk_batchcode, that.pk_batchcode) &&
                Objects.equals(vbatchcode, that.vbatchcode) &&
                Objects.equals(cproductorid, that.cproductorid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(cmaterialvid, pk_batchcode, vbatchcode, cproductorid);
    }
}
